from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval

coco_true = COCO(annotation_file='/mnt/sdb2/ray/mmdetection-main/data/coco/annotations/instances_val2017.json')
coco_pre = coco_true.loadRes('output/prediction/prediction8.json')
cocoevaluator = COCOeval(cocoGt = coco_true, cocoDt = coco_pre, iouType = "bbox")
cocoevaluator.evaluate()
cocoevaluator.accumulate()
cocoevaluator.summarize()
